Make more compiler warnings into errors
authorColin Walters <walters@verbum.org>
Thu, 28 Jun 2012 00:26:08 +0000 (20:26 -0400)
committerColin Walters <walters@verbum.org>
Thu, 28 Jun 2012 02:26:16 +0000 (22:26 -0400)
In particular, I want -Werror=format=2 to catch format string bugs.

configure.ac

index b7a41b558779692dae1e17deecda5c6bf50712ce..f4192961806215d09c69bcb5477faaeb6923aee3 100644 (file)
@@ -13,7 +13,12 @@ AM_PROG_CC_C_O
 
 changequote(,)dnl
 if test "x$GCC" = "xyes"; then
-  WARN_CFLAGS="-Wall -Werror=missing-prototypes"
+  WARN_CFLAGS="-Wall -Wstrict-prototypes -Werror=missing-prototypes \
+               -Werror=implicit-function-declaration \
+               -Werror=pointer-arith -Werror=init-self -Werror=format=2 \
+               -Werror=format-security \
+               -Werror=missing-include-dirs -Werror=aggregate-return \
+               -Werror=declaration-after-statement"
 fi
 changequote([,])dnl
 AC_SUBST(WARN_CFLAGS)